﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WeatherSystem.Net;

namespace WeatherSystem.Application.MsgHandler
{
    class TextHandler : IMsgHandler
    {
        public Message Handle(HttpArgs args)
        {
            return new TextMessage
            {
                FromUserName = args.GetPostValue()["FromUserName"]["#cdata-section"].ToString(),
                ToUserName = args.GetPostValue()["ToUserName"]["#cdata-section"].ToString(),
                Content = args.GetPostValue()["Content"]["#cdata-section"].ToString()
            };
        }
    }
}
